/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package src.services.loan;

/**
 *
 * @author jay
 */

import java.util.List;
import java.util.Map;
import src.domain.loan.Loanclosure;
import src.services.CRUEDService;

public class LoanclosureModel implements java.io.Serializable {
    
    private CRUEDService service;
    
    public LoanclosureModel() {
        service = new CRUEDService();
    }
    
   // public Loanclosure getByNumber(String value) {
   //     Map<String, String> where = new HashMap<>();
   //     where.put("pmt.paymentNo", value);
   //     return (Loanclosure) service.getObjectSQL("from Loanclosure pmt", where);
   // }
    
    public List<Loanclosure> findAll(Map<String, String> filters) {
        return (List<Loanclosure>) service.findAll("Loanclosure", filters);
    }
    
  //  public List<SelectItem> listAll() {
  //      return service.listAll("Loanclosure", "loanId","paymentNo");
  //  }

    public boolean saveData(Loanclosure data) {
        return service.saveData(data);
    }
    
    public boolean deleteData(Loanclosure data) {
        return service.deleteData(data);
    }
}
